<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewProductTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewProductLabel_id}"/>
                    <h:outputText value="#{productController.selected.id}" title="#{bundle.ViewProductTitle_id}"/>
                    <h:outputText value="#{bundle.ViewProductLabel_name}"/>
                    <h:outputText value="#{productController.selected.name}" title="#{bundle.ViewProductTitle_name}"/>
                    <h:outputText value="#{bundle.ViewProductLabel_description}"/>
                    <h:outputText value="#{productController.selected.description}" title="#{bundle.ViewProductTitle_description}"/>
                    <h:outputText value="#{bundle.ViewProductLabel_price}"/>
                    <h:outputText value="#{productController.selected.price}" title="#{bundle.ViewProductTitle_price}"/>
                    <h:outputText value="#{bundle.ViewProductLabel_stock}"/>
                    <h:outputText value="#{productController.selected.stock}" title="#{bundle.ViewProductTitle_stock}"/>
                    <h:outputText value="#{bundle.ViewProductLabel_lastUpdate}"/>
                    <h:outputText value="#{productController.selected.lastUpdate}" title="#{bundle.ViewProductTitle_lastUpdate}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewProductLabel_image}"/>
                    <h:outputText value="#{productController.selected.image}" title="#{bundle.ViewProductTitle_image}"/>
                    <h:outputText value="#{bundle.ViewProductLabel_categoryId}"/>
                    <h:outputText value="#{productController.selected.categoryId}" title="#{bundle.ViewProductTitle_categoryId}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{productController.destroyAndView}" value="#{bundle.ViewProductDestroyLink}"/>
                <br />
                <br />
                <h:link outcome="Edit" value="#{bundle.ViewProductEditLink}"/>
                <br />
                <h:commandLink action="#{productController.prepareCreate}" value="#{bundle.ViewProductCreateLink}" />
                <br />
                <h:commandLink action="#{productController.prepareList}" value="#{bundle.ViewProductShowAllLink}"/>
                <br />
                <br />
                <h:link outcome="/index_old" value="#{bundle.ViewProductIndexLink}"/>

            </h:form>
        </ui:define>
    </ui:composition>

</html>
